# Maintainer: ufbycd <ufbycd@163.com>

pkgname=NUC970_NuWriter_CMD
pkgver=1.0.2
pkgrel=1
pkgdesc="NUC970 NuWriter Linux command tool"
arch=('x86_64')
url="https://gitee.com/ufbycd/$pkgname"
license=('GPL')
groups=('OpenNuvoton')
depends=('libusb>=1.0.0')
install="$pkgname.install"
source=("$pkgname-$pkgver.tar.gz::https://gitee.com/ufbycd/$pkgname/repository/archive/v${pkgver}?format=tar.gz"
        "$pkgname.install")
md5sums=("474856cddf826c0d1ecda1dc066f1a6f"
         "c0db80d98134caf41f520c42b2f781d9")

build() {
	cd "${srcdir}/${pkgname}"
	./configure --prefix=/usr
	make
}

package() {
	cd "${srcdir}/${pkgname}"
	make DESTDIR="$pkgdir/" install
	install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
	install -Dm644 99-nuvoton_isp.rules "$pkgdir/etc/udev/rules.d/99-nuvoton_isp.rules"
}
